<?php
session_start();
require_once("../settings.php");
	require_once INCLUDE_PATH."config.php";
	require_once CONTROLLER_PATH."ajaxcontroller/class.ajaxController.php";

$ajaxObj = new ajaxController;

switch(strtolower($_POST[funcName]))
{
	
	case 'sendenquiry':
		echo $ajaxObj->basicEnquiry();
	break;
	case 'addtocart':
		echo $ajaxObj->addItemToCart();
	break;
	case 'removefromcart':
		echo $ajaxObj->removeItemFromCart();
	break;
	case 'checkevent':
		echo $ajaxObj->checkEvent();
	break;
	case 'checknewsarticle':
		echo $ajaxObj->checkNewsArticle();
	break;
	case 'checkusernick':
		echo $ajaxObj->checkUserNickname();
	break;
	case 'checkproductname':
		echo $ajaxObj->checkProductName();
	break;
    case 'models':
        echo $ajaxObj->getModels();
    break;
    case 'login':
        echo $ajaxObj->asyncLogin();
    break;
    case 'postcomment':
    case 'view_partial_comments':
    case 'repostcomment':
    case 'removecomment':
    case 'removesubcomment':
    case 'view_all_comments':
    case 'view_partial_comments':
    case 'view_partial_sub':
    case 'view_all_sub':
    
        echo $ajaxObj->asyncPostComment();
    break;
    
	default:
    $comObj = new common;
		//echo "No default load function defined.";
       echo $comObj->array_to_jsonData($ajaxObj->getModels());
	break;
	
}
